<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>模块的作用域</title>
  </head>
  <body>
    <script>
      let site = "后盾人";
      console.log(document.querySelector("button"));
    </script>

    <script type="module">
      //模块会延迟解析
      console.log(document.querySelector("button"));
      let title = "hdcms";
    </script>
    <script type="module">
      //模块默认使用严格模式
      let hd = "houdunren";
      console.log(title);
    </script>
    <button>后盾人</button>
  </body>
</html>
